#!/usr/bin/env python
#coding=utf8

from socket import *
from time import time, sleep

import struct,json

client = socket(AF_INET, SOCK_DGRAM)
addr = ("192.168.1.145",5151)

for i in xrange(100):
	jsData = json.dumps({"cmd":101,"program":"nanjing"}, ensure_ascii=False)   
	data = struct.pack("%ds" % len(jsData), jsData);
	client.sendto(data, addr)
	sleep(60)
	print i